﻿using System;
using System.Collections.Generic;
using System.Text;

using SendLeaderMarking.Common.Interface;
using SendLeaderMarking.Common.Entity;
using System.Collections;

namespace SendLeaderMarking.Logic
{
    class SendMarkingLogic : ISendMarking
    {

        public IList GetSupervisor(string strUserCode)
        {
            DataHelper dataHelper = DataHelper.Instance();
            return dataHelper.GetList("SendMarking_GetSupervisor", strUserCode);
        }

        public IList GetTopLeader(string strUserCode)
        {
            DataHelper dataHelper = DataHelper.Instance();
            return dataHelper.GetList("SendMarking_GetTopLeader", strUserCode);
        }

        public IList GetLeader(string strUserCode)
        {
            DataHelper dataHelper = DataHelper.Instance();
            return dataHelper.GetList("SendMarking_GetLeader", strUserCode);
        }

        public IList GetHeadLeader()
        {
            DataHelper dataHelper = DataHelper.Instance();
            return dataHelper.GetList("SendMarking_GetHeadLeader", null);
        }

        public IList GetNormalMsg(string strUserCode)
        {
            DataHelper dataHelper = DataHelper.Instance();
            return dataHelper.GetList("SendMarking_GetNormalMsg",strUserCode);
        }

        public void InsertTaskMsg(ApprovalHistoryEntity histroy)
        {
            DataHelper dataHelper = DataHelper.Instance();
            object obj = dataHelper.Insert("SendMarking_InsertTask", histroy);
        }

        public UserEntity GetUser(string strUserCode)
        {
            DataHelper dataHelper = DataHelper.Instance();
            return dataHelper.Get<UserEntity>("SendMarking_GetUser", strUserCode);
        }
    }
}
